package com.yun.zf.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yun.zf.common.app.domain.SysCoupon;
import com.yun.zf.common.app.dto.center.CouponListDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 优惠券表 Mapper 接口
 * </p>
 *
 * @author cj
 * @since 2021-05-31
 */
public interface SysCouponMapper extends BaseMapper<SysCoupon> {

    @Select("<script>" +
            " SELECT c.id couponId,c.type,c.title,c.subtitle,c.with_amount,c.used_amount,c.discount,c.description from sys_coupon c WHERE c.activity_id =#{activityId} " +
            "</script>")
    public List<CouponListDto> getCouponList(String activityId);
}
